package com.ruoyi.app.config;

import com.ijpay.alipay.AliPayApiConfig;
import com.ijpay.alipay.AliPayApiConfigKit;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

public class AliPay {


    public static void initAliPay() {
        AliPayApiConfig aliPayApiConfig = AliPayApiConfig.builder()
                .setAppId("2021002101608126")
                .setAliPayPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l5Z/NAeVhli3sXZN8RBxawPz2Qr3clEk7WrDnTbH4RucX/IbbHqX+KCkEzIla3ua4+zE3lP91JpaBblCNgD+Y95Cxdq97eXZ/T6klDvXRyW7lXfYmBr+ks+M5r4/J+3smSTSo9tkkSgJBLuzaplWzbwm05wKuJNycv8HETYgC40BlFnzO/hmcEBFPvQqPf/DXXQEwL6kS91Z3ZihstAlVxou4UvUeSVUS72rnN6NlwSTXXeYIjf0N0FQTdho9bAFs/ezCTT62OBo+X05fx1vNfSW8gTAkN0mX4EKuwQEWufe1BeJk72852+7hWDkx4rMb2yXp4njNbtPO0eLjH6xwIDAQAB")
                .setCharset("UTF-8")
                .setPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCYOAfto2jwgcHO7CwYuCXFImwf1wRpgcTHDIfyYTvK6inP2ANFnr8aVtAPHaqInwEXu5B/5W5g4vKZlvbQrt60xamRthp+mYmq5HP4LJrWs9LSrrn+CuUf1X4cUhv6B6G2M/g6QeqMaxfnGG3iKxwGEv3nV1oytEBoY/x6BfUSJRLeaco3qxP5tCg4pGHJfn5NKjRIggs+EkC/B4pQxwc8e1zYnE6RNGakfVSQS1qEw/+OnbSDMsxSq/ij2AXM4HUn7rsS2OKjx/m+a9jTeaixOjJfbWAT9F51IiCfMdYhc3p5bzy1I8WyFqshZBHAIt+fJxBRno7oKn3vghuBsKr7AgMBAAECggEAGRwtGqN5PSt6iCLnh1BhUqrCAWKb5Le2eUt05aPqlCearCGrMIHmbnbhrYysRAtOx9Z2GNM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Osx3ZrcNbuePKxz9hoEG/rLWPd8ZcNDFnTJ/uEnukLfOGqT3QMdtJTS5g9sRNmQpYGE/uM+s0=")
                .setServiceUrl("www.baidu.com")
                .setSignType("RSA2")
                .build();
        AliPayApiConfigKit.setThreadLocalAliPayApiConfig(aliPayApiConfig);
    }


}
